﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TodoApp.ResultModel;
using Volo.Abp.Application.Services;

namespace TodoApp.TMS_settlement.Inputs
{
    public class TMS_InputService: ApplicationService
    {
        public readonly ITMS_InputRepository _tMS_InputRepository;
        public TMS_InputService(ITMS_InputRepository tMS_InputRepository)
        {
            _tMS_InputRepository = tMS_InputRepository;
        }
        /// <summary>
        /// 显示
        /// </summary>
        /// <param name="name"></param>
        /// <param name="department"></param>
        /// <param name="position"></param>
        /// <param name="date"></param>
        /// <param name="state"></param>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public async Task<PageResponse<TMS_InputDto>> GetInput(string name, string date, bool? state, int pageindex, int pagesize)
        {
            return await _tMS_InputRepository.GetInput(name, date, state, pageindex, pagesize);
        }
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task<int> DeletePayment(string id)
        {
            return await _tMS_InputRepository.DeleteInput(id);
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="tMS_Induction"></param>
        /// <returns></returns>
        public async Task<int> UpdateInput(TMS_Input tMS_Payment)
        {
            return await _tMS_InputRepository.UpdateInput(tMS_Payment);
        }
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="tMS_Induction"></param>
        /// <returns></returns>
        public async Task<int> CreatePayment(TMS_Input tMS_Payment)
        {
            return await _tMS_InputRepository.CreateInput(tMS_Payment);
        }
    }
}
